<template>
    <div>
        <h1>父组件</h1>
        <input type="text" v-model="username">
        <input type="text" v-model="age">
        <Abc v-model:username="username" v-model:age="age"></Abc>
    </div>
</template>

<script setup>
/**
 * defineModel：实现父子组件双向同步数据
 */
import Abc from './components/Abc.vue';
import { ref } from 'vue'
let username = ref('张三')
let age = ref(18)
</script>

<style lang="scss" scoped></style>